package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.hr.vo.ApplyToProgDepVO;
import org.jsola.hr.vo.ApplyToProgLevelVO;
import org.jsola.hr.vo.ApplyToProgPositionVO;


import java.util.List;

import static org.jsola.hr.example.ApplyToProgExample.*;
import static org.jsola.hr.example.ApplyToProgExample.E_APPLY_TO_LEVEL;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.ApplyToProgExample.E_BUS_PROG_ID;
import static org.jsola.hr.example.ApplyToProgExample.E_BUS_PROG_TYPE;
import static org.jsola.hr.example.ApplyToProgExample.E_COMPANY_ID;
import static org.jsola.hr.example.ApplyToProgExample.E_EMPLOY_RANGE;
import static org.jsola.hr.example.ApplyToProgExample.E_EMPLOY_TYPE;
import static org.jsola.hr.example.ApplyToProgExample.M_BUS_PROG_ID_MAX;
import static org.jsola.hr.example.ApplyToProgExample.M_BUS_PROG_TYPE_MAX;
import static org.jsola.hr.example.ApplyToProgExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.ApplyToProgExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.ApplyToProgExample.M_EMPLOY_RANGE_MAX;
import static org.jsola.hr.example.ApplyToProgExample.M_EMPLOY_TYPE_MAX;
import static org.jsola.hr.example.ApplyToProgExample.N_BUS_PROG_ID;
import static org.jsola.hr.example.ApplyToProgExample.N_BUS_PROG_TYPE;
import static org.jsola.hr.example.ApplyToProgExample.N_COMPANY_ID;
import static org.jsola.hr.example.ApplyToProgExample.N_EMPLOY_RANGE;
import static org.jsola.hr.example.ApplyToProgExample.N_EMPLOY_TYPE;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【方案适用设置】的参数")
@Data
public class ApplyToProgAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_BUS_PROG_TYPE, example = E_BUS_PROG_TYPE)
    @Length(max = 32, message = M_BUS_PROG_TYPE_MAX)
    private String busProgType;

    @ApiModelProperty(notes = N_BUS_PROG_ID, example = E_BUS_PROG_ID)
    @Length(max = 32, message = M_BUS_PROG_ID_MAX)
    private String busProgId;

    @ApiModelProperty(notes = N_EMPLOY_TYPE, example = E_EMPLOY_TYPE)
    @Length(max = 255, message = M_EMPLOY_TYPE_MAX)
    private String employType;

    @ApiModelProperty(notes = N_EMPLOY_RANGE, example = E_EMPLOY_RANGE)
    @Length(max = 255, message = M_EMPLOY_RANGE_MAX)
    private String employRange;

    @ApiModelProperty(notes = N_AUTEX, example = E_AUTEX)
    private  Boolean mutex;


    @ApiModelProperty(notes = N_APPLY_TO_DEP, example = E_APPLY_TO_DEP)
    private List<ApplyToProgDepAddDTO> applyToProgDepAddDTOList;

    @ApiModelProperty(notes = N_APPLY_TO_POSITION, example = E_APPLY_TO_POSITION)
    private List<ApplyToProgPositionAddDTO> applyToProgPositionAddDTOList;

    @ApiModelProperty(notes = N_APPLY_TO_LEVEL, example = E_APPLY_TO_LEVEL)
    private List<ApplyToProgLevelAddDTO> applyToProgLevelAddDTOList;
    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

